Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2316: handle absent Promise for better IE11 support #2317

Merged
merged 1 commit into from
Dec 9, 2020

Conversation

muodov
Copy link
Contributor

@muodov muodov commented Dec 5, 2020

Purpose (TL;DR) - mandatory

Fix #2316: Don't raise exceptions if Promise is not defined

How to verify - mandatory

  1. Check out this branch
  2. npm install
  3. Use the library in IE11

Checklist for author

  • npm run lint passes
  • References to standard library functions are cached.

@muodov muodov changed the title Fix #2316: handle absent Promise Fix #2316: handle absent Promise for better IE11 support Dec 5, 2020
Copy link
Contributor

@fatso83 fatso83 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems legit, but should probably test drive this in our Sauce labs suite.

@muodov
Copy link
Contributor Author

muodov commented Dec 7, 2020

@fatso83 Thanks for the review!
The test suite (as far as I can see), is doing a similar check itself, so those tests are just skipped.
I tested it manually in our product (where it broke in the first place), and the fix worked there.
Please let me know what I can do to get this merged soon.

@mantoni mantoni merged commit ef0404e into sinonjs:master Dec 9, 2020
@mantoni
Copy link
Member

mantoni commented Dec 9, 2020

Tests are already skipped correctly when Promise is not defined. Thank you @muodov 👍

I can't make a release atm. If anyone else in @sinonjs/sinon-core could, that'd be great.

@mroderick
Copy link
Member

This has been published as sinon@9.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code for the Promise fake throws on IE11
4 participants